import * as antionTypes from './constants';

import {getTopList,getRankingList} from '@/services/ranking';

const changeTopListAction=(res)=>({
    type:antionTypes.CHANGE_TOP_LIST,
    topList: res.list
})

export const getTops=()=>{
    return dispatch =>{
        getTopList().then(res=>{
            dispatch(changeTopListAction(res))
            console.log(res);
        })
    }
}

